package com.lcb.blog.service;

import com.lcb.blog.base.BaseResponse;
import com.lcb.blog.entity.Blog;
import org.springframework.web.bind.annotation.*;

/****
 * @Author:lcb
 * @Description:Blog业务层接口
 * @Date: 2020-12-29 14:38:32
 *****/
public interface BlogService {

    /***
     * Blog多条件分页查询
     * @param blog
     * @param page
     * @param size
     * @return
     */
    @GetMapping("/findBlogList/{page}/{size}")
    BaseResponse findBlogList(@RequestBody Blog blog, @PathVariable(value = "page") int page, @PathVariable(value = "size") int size);

    /***
     * 删除Blog
     * @param ids
     */
    @DeleteMapping("/deleteBlogById/{ids}")
    BaseResponse deleteBlogById(@PathVariable(value = "ids") String ids);

    /***
     * 修改Blog数据
     * @param blog
     */
    @PutMapping("/updateBlog")
    BaseResponse updateBlog(@RequestBody Blog blog);

    /***
     * 新增Blog
     * @param blog
     */
    @PostMapping("/addBlog")
    BaseResponse addBlog(@RequestBody Blog blog);

    /**
     * 根据ID查询Blog
     * @param id
     * @return
     */
    @GetMapping("/findBlogById/{id}")
    BaseResponse findBlogById(@PathVariable("id") Long id);

    /***
     * 查询所有Blog
     * @return
     */
    @GetMapping("/findBlogAll")
    BaseResponse findBlogAll();
}
